package org.yawnage.framework 
{
	import org.yawnage.base.BaseKeyMapper;
	import flash.utils.Dictionary;
	import org.yawnage.interfaces.base.IMapperObject;
	 /**
	  * <p>//TODO:To be written</p>
	  * @author Berry Jordaan
	  * @date 2011/09/06 02:34 PM
	  * @copyright  Copyright © Berry/James 2011
	  * @version 1.0.0.0
	  * @description
	  * @history Berry Jordaan on 2011/09/06 02:34 PM: Created
	  */
	public class ClientObject extends BaseKeyMapper implements IMapperObject
	{

		//************** Enums **************

		//************** Public *************
		
		//************** Private ************
		private var publisherName:String;
		
		//************** protected **********
		
		/**
		 * Constructor
		 */
		public function ClientObject(publisherName:String)
		{
			super();
			setClassDescription("org.yawnage.framework.ClientObject");
			this.publisherName = publisherName;
		}
		
		/**
		 * useless comment here!
		 */
		public function addBridge(bridge:Bridge):Bridge 
		{
			return Bridge(addObject(IMapperObject(bridge)));
		}
		
		public function getBridge(name:String):Bridge 
		{
			return Bridge(getObjectbyKey(name));
		}
		
		public function removeBridge(name:String):void 
		{
			removeObject(name);
		}
		
		public function getMap():Dictionary 
		{
			return _mapper;
		}
		
		public function hasBridge(name:String):Boolean 
		{
			return hasObject(name);
		}
		
		/**
		 * useless comment here!
		 */
		override public function dispose():void 
		{
			super.dispose();
		}
		
		/* INTERFACE org.yawnage.base.interfaces.IMapperObject */
		
		public function get key():String 
		{
			return publisherName;
		}
		
	}
}